package com.myproject.myblogserver.dto.user;

import java.time.LocalDate;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

@Data
public class UserInfoDisplayDto {
    private Long id;
    private String name;
    private String email;
    private String avatar;
    private String bio;
    private LocalDate birthdate;
    private LocalDateTime createdAt;

    private Long followingCount;
    private Long followerCount;
    
    // 新增序列化配置（确保日期转字符串）
    @JsonFormat(pattern = "yyyy-MM-dd")
    public LocalDate getBirthdate() {
        return birthdate;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }
}
